package com.thoughtworks.twu.module1;

public class Main {
    public static void main(String[] args) {
        TriangleExercises.run();
        DiamondExercises.run();
        FizzBuzz();
        PrimeFactorsExercise.run();
    }

    private static void FizzBuzz() {
        Utilities.printTitle("FizzBuzz");

        for (int number = 1; number <= 100; number++) {
            boolean divisibleBy3 = (number % 3 == 0);
            boolean divisibleBy5 = (number % 5 == 0);

            if (divisibleBy3 && divisibleBy5) {
                System.out.println("FizzBuzz");
            } else if (divisibleBy3) {
                System.out.println("Fizz");
            } else if (divisibleBy5) {
                System.out.println("Buzz");
            } else {
                System.out.println(number);
            }
        }
    }
}
